package com.maple.soa.service.impl;

import com.maple.soa.dao.UserDao;
import com.maple.soa.pojo.User;
import com.maple.soa.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

/**
 * @author lijian
 * @date 2020/7/6
 */
@Service("userService")
public class UseServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public User getById(Long id) {
        System.out.println("根据id查询");
        return userDao.getById(id);
    }

    @Override
    public void saveOrUpdate(User user) {
        userDao.saveOrUpdate(user);
    }
}
